home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Graphics / Utilities / MacGS 2.5.2ß3 RT No Fonts ƒ / gs / system / gs_mac.ps < prev    next >
Text File  |  1994-02-15  |  3KB  |  124 lines

  1. %!
  2.  
  3.  
  4. /strcat         %   string1 string2  ->  newString
  5. {
  6.     dup length 3 -1 roll dup length     % s2 l2 s1 l1
  7.     dup 4 -1 roll add string dup        % s2 s1 l1 ns ns
  8.     4 -1 roll 0 exch putinterval        % s2 l1 ns
  9.     dup 4 1 roll exch 3 -1 roll         % ns ns l1 s2
  10.     putinterval                         % ns
  11. } def
  12.  
  13.  
  14. % Check the Mac GUI revision.
  15.  
  16. 2523
  17. dup .macGSversion ne
  18. {
  19.     (MacGS GUI revision \() .macGSversion 10 string cvs strcat
  20.     (\) does not match gs_mac.ps revision \() strcat exch 10 string cvs strcat
  21.     (\).) strcat .macalert pop
  22.     1 .quit
  23. } if pop
  24.  
  25.  
  26. /.macshowpage where
  27.     {
  28.         pop
  29.     }
  30.     {
  31.         /.macshowpage /showpage load def        %   original definition
  32.  
  33.         /.domacshowpage 0 def                   %   use original or spoof
  34.  
  35.         /showpage                               %   Mac showpage
  36.         {
  37.             [
  38.                 %   case 0
  39.                 {
  40.                     .macshowpage    %   use original showpage (non-Mac device driver)
  41.                 }
  42.                 %   case 1
  43.                 {
  44.                     #copies true .outputpage
  45.                     (>>> showpage, select Resume from MacGS menu to continue <<<\n)
  46.                     print flush
  47.                     .macconfirm erasepage initgraphics not {stop} if
  48.                 }
  49.                 %   case 2
  50.                 {
  51.                     #copies true .outputpage erasepage initgraphics
  52.                     %   do not pause for automatic printing
  53.                 }
  54.             ]
  55.             .domacshowpage get exec
  56.         } def
  57.  
  58.         /.maccopypage /copypage load def        %   original definition
  59.  
  60.         /copypage                               %   Mac copypage
  61.         {
  62.             [
  63.                 %   case 0
  64.                 {
  65.                     .maccopypage    %   use original copypage (non-Mac device driver)
  66.                 }
  67.                 %   case 1
  68.                 {
  69.                     #copies true .outputpage
  70.                     (>>> copypage, select Resume from MacGS menu to continue <<<\n)
  71.                     print flush
  72.                     .macconfirm not {stop} if
  73.                 }
  74.                 %   case 2
  75.                 {
  76.                     #copies true .outputpage
  77.                     %   do not pause for automatic printing
  78.                 }
  79.             ]
  80.             .domacshowpage get exec
  81.         } def
  82.  
  83.     } ifelse
  84.  
  85.  
  86. /.macrunfile
  87. {
  88.     .macopenfile
  89.     {
  90.         userdict /.macRunFile 3 -1 roll put
  91.  
  92.         count array astore userdict /.macOperStack 3 -1 roll store      %   save operands
  93.         userdict /.macDictStack countdictstack array dictstack store    %   save dicts
  94.  
  95.         erasepage gsave userdict /.macRunFile get cvx execute grestore initgraphics
  96.  
  97.         clear userdict /.macOperStack get aload pop     %   restore operand stack
  98.  
  99.         countdictstack 3 sub 0 1 3 -1 roll              %   close non-standard dicts
  100.         {
  101.             pop end
  102.         } for
  103.  
  104.         2 1 userdict /.macDictStack get length 1 sub    %   re-open non-standard dicts
  105.         {
  106.             userdict /.macDictStack get get begin
  107.         } for
  108.     } if
  109. } def
  110.  
  111.  
  112. /.maclaserprep
  113. {
  114.     {(laserprep_68.pro) run} execute
  115. } def
  116.  
  117.  
  118. /.macsetdevice
  119. {
  120.     getdevice
  121.     dup devicename (...Using device ") print print ("...\n) print flush
  122.     setdevice
  123. } def
  124.